package com.sunzm.pattern;

import java.util.regex.Pattern;

public class PatternDemo {
    public static void main(String[] args) {
        String str = "a,addCart,search";
        String pattern = ".*addCart{1,}.*search{1,}.*";
        boolean isMatch = Pattern.matches(pattern, str);

        System.out.println(isMatch);
    }
}
